package com.gxa.meiye.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.meiye.admin.mapper.TherapistMapper;
import com.gxa.meiye.admin.service.TherapistService;
import com.gxa.meiye.core.pojo.domain.PayAccountInfo;
import com.gxa.meiye.core.pojo.domain.TherapistInfo;
import com.gxa.meiye.core.pojo.entity.Therapist;

import com.gxa.meiye.core.pojo.vo.PayAccountInfoVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author chen
 * @date 2022/7/19 10:13
 */
@Service
public class TherapistServiceImpl extends ServiceImpl<TherapistMapper, Therapist> implements TherapistService {

    @Resource
    private TherapistMapper therapistMapper;

    @Override
    public Integer setRelNameByID(Integer id) {
        return this.therapistMapper.updateStatusByID(id,"real_name_verification","1");
    }

    @Override
    public Integer updateMyMessage(Map map, Integer id) {
        return null;
    }

    @Override
    public Integer updatePayInfo(String name, String account, Integer id) {
        return this.therapistMapper.updateZfbAccountById(name, account, id);
    }

    @Override
    public PayAccountInfo queryById(Integer id) {
        return this.therapistMapper.queryByTherapistId(id);
    }

    @Override
    public TherapistInfo queryMyMessage(Integer id) {
        return this.therapistMapper.queryMyMessage(id);
    }

    @Override
    public List<String> getEvaluate(Integer id,Integer page,Integer size) {
        return this.therapistMapper.queryEvaluate(id,(page-1)*size,size);
    }

    @Override
    public Integer addPayAccount(PayAccountInfoVo payAccountInfoVo) {
        return this.therapistMapper.addPayAccount(payAccountInfoVo);
    }

    @Override
    public List<Integer> getGrade(Integer id) {
        return this.therapistMapper.getGradeById(id);
    }

    @Override
    public Integer getTotal(Integer id) {
        return this.therapistMapper.getTotal(id);
    }


}